def foo(s):
    # 异常最终发生在 foo 函数中,但是foo 函数没有捕获处理异常,异常会沿着调用栈向上传递
    return 10 / int(s)


def bar(s):
    return foo(s) * 2


def main():
    bar('0')


if __name__ == '__main__':
    try:
        main()
    except Exception as e:
        print('Error:', e)
